#ifndef __OPENDPIDEMO_H__
#define __OPENDPIDEMO_H__

#ifdef __linux__
#include <linux/ip.h>
#include <netinet/ip6.h>
#include <linux/tcp.h>
#include <linux/udp.h>
#include <linux/if_ether.h>
#include <time.h>
#include <pcap.h>
#else
#include "linux_compat.h"
#endif

#include "ipq_api.h"

// id tracking
struct osdpi_ip_addr {
#ifdef IPOQUE_DETECTION_SUPPORT_IPV6
	u32 is_ip_v6;
#endif
	union {
		u32 ipv4;
#ifdef IPOQUE_DETECTION_SUPPORT_IPV6
		struct in6_addr ipv6;
#endif
	};
};

typedef struct osdpi_id {
	struct osdpi_ip_addr ip;
	struct ipoque_id_struct *ipoque_id;
} osdpi_id_t;

// flow tracking
typedef struct osdpi_flow {
	struct ipoque_unique_flow_ipv4_and_6_struct key;
	struct ipoque_flow_struct *ipoque_flow;

	// result only, not used for flow identification
	u32 detected_protocol;
} osdpi_flow_t;

#define			MAX_OSDPI_IDS			50000	
#define			MAX_OSDPI_FLOWS			200000
//#define OPEN_PCAP_FILE

#endif
